package Spark2JDBC

import org.apache.spark.sql.{DataFrame, SparkSession}

/**
  * Created by Administrator on 2018/5/28.
  */
object ParquetDataSource {
  def main(args: Array[String]): Unit = {
    val spark = SparkSession
      .builder()
      .appName("JsonDataSource")
      .master("local[*]")
      .getOrCreate()

    import spark.implicits._
    val parquetLine: DataFrame = spark.read.parquet("D:\\SparkTestData\\parquet")
    //val parquetLine: DataFrame = spark.read.format("parquet").load("D:\\SparkTestData\\parquet")

    parquetLine.printSchema()
    parquetLine.show()

    spark.stop()
  }
}
